import { ref, computed } from 'vue'
export default function () {
    const counter = ref(0)
    const add = (num) => {
        counter.value++
    }
    const cut = () => {
        counter.value--
    }
    const doubleCounter = computed( () => {
        return counter.value * 2
    })
    return {
        counter,
        cut,
        add,
        doubleCounter
    }
}